package com.example.demo.dao;

import com.example.demo.entity.UserEntity;
import com.example.demo.mapper.UserMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * Created by hongzhenyue on 18/3/6.
 */
@Component
public class UserDao {
    @Autowired
    private UserMapper userMapper;

    public int insert(UserEntity userEntity) {
        return userMapper.insert(userEntity);
    }

    public UserEntity selectByUsername(String username) {
        return userMapper.selectByUsername(username);
    }
}
